﻿<Window x:Class="SoftTeach.View.Datenbank.DateitypWorkspaceView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:resources="clr-namespace:SoftTeach.Resources" xmlns:SoftTeach="clr-namespace:SoftTeach"
        xmlns:controls="clr-namespace:SoftTeach.Resources.Controls" mc:Ignorable="d" 
        Title="Datenbank - Dateitypen"
        Icon="/SoftTeach;component/Images/Database.ico"
             d:DesignHeight="400" d:DesignWidth="800" WindowStyle="SingleBorderWindow">
  <Window.Resources>
  </Window.Resources>
  <Grid Background="{StaticResource MainBackgroundBrush}">
    <Grid.RowDefinitions>
      <RowDefinition Height="48"/>
      <RowDefinition Height="48"/>
      <RowDefinition/>
      <RowDefinition Height="32"/>
    </Grid.RowDefinitions>
    <controls:SmallDialogHeader  Icon="/SoftTeach;component/Images/Dateityp32.png" 
                              Grid.Row="0" 
                              Title="Ergänzen oder entfernen Sie hier Dateitypen."/>
    <Border Grid.Row="1" Name="DescriptionArea">
      <StackPanel Orientation="Horizontal" Margin="5">
        <Button Width="150" Height="32" Name="AddButton" Command="{Binding Path=AddDateitypCommand}">
          <StackPanel Orientation="Horizontal">
            <Grid>
              <Image Source="/SoftTeach;component/Images/Dateityp32.png"/>
              <Image Source="/SoftTeach;component/Images/AddOverlay32.png"/>
            </Grid>
            <Label Content="Dateityp hinzufügen"/>
          </StackPanel>
        </Button>
        <Label></Label>
        <Button Width="150" Height="32" Name="RemoveButton" Command="{Binding Path=DeleteDateitypCommand}">
          <StackPanel Orientation="Horizontal">
            <Grid>
              <Image Source="/SoftTeach;component/Images/Dateityp32.png"/>
              <Image Source="/SoftTeach;component/Images/RemoveOverlay32.png"/>
            </Grid>
            <Label Content="Dateityp entfernen"/>
          </StackPanel>
        </Button>
      </StackPanel>
    </Border>
    <GroupBox Grid.Row="2" Header="Tabelle der Dateitypen" Padding="3" Margin="5">
      <DataGrid SelectedItem="{Binding Path=CurrentDateityp, Mode=TwoWay}" ItemsSource="{Binding Source={x:Static SoftTeach:App.MainViewModel}, Path=Dateitypen}" AutoGenerateColumns="False">
        <DataGrid.Columns>
          <DataGridTextColumn Header="Kürzel" Binding="{Binding Path=DateitypKürzel}" Width="100" />
          <DataGridTextColumn Header="Bezeichnung" Binding="{Binding Path=DateitypBezeichnung}" Width="*" />
        </DataGrid.Columns>
      </DataGrid>
    </GroupBox>
    <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
      <Button Name="OK" Width="80" Margin="3" IsDefault="True" Click="OKClick">OK</Button>
      <!--<Button Name="Abbrechen"  Width="80" Margin="3" IsCancel="True">Abbrechen</Button>-->
    </StackPanel>
  </Grid>
</Window>
